<script setup lang="ts">
// import { ref } from 'vue'
import DivLogin from "./com/login.vue"
import { useRouter } from 'vue-router'
const $router = useRouter()//路由口

const onLogin = (blok: any, res: any) => {
  console.log(blok, res)
  if (blok == "login") {
    $router.push('/home');
  }

}
</script>

<template>
  <div class="body">
    <div class="divLogin">
      <DivLogin title="is Title" :onLogin="onLogin"></DivLogin>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.body {
  width: 100vw;
  height: 100vh;

  background-image: url(../../assets/body.png);
  background-size: cover auto;
  background-position: center;
}

.divLogin {
  position: absolute;
  top: 18vh;
  right: 10vw;
}
</style>
